﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PrinterMonitorSvc.Common
{
    /// <summary>
    /// 任务帮助类
    /// </summary>
    public class TaskHelper
    {
        /// <summary>
        /// 启动一个长时间运行的任务
        /// </summary>
        /// <param name="action"></param>
        public static void StartLongTask(Action action)
        {
            Task.Factory.StartNew(action, TaskCreationOptions.LongRunning);
        }
    }
}
